#ifndef PROPERTY_ACCESSOR_H
#define PROPERTY_ACCESSOR_H

#include <QObject>
#include <QString>
#include <QVariant>
#include <pybind11/embed.h>

namespace pybind11 {
class object;
}

class PropertyAccessor {
public:
  static pybind11::object getProperty(QObject *obj,
                                      const QString &propertyName);
  static bool setProperty(QObject *obj, const QString &propertyName,
                          const pybind11::object &value);

private:
  static QVariant pyObjectToQVariant(const pybind11::object &obj);
  static pybind11::object qVariantToPyObject(const QVariant &variant);
};

#endif // PROPERTY_ACCESSOR_H